home *** CD-ROM | disk | FTP | other *** search
-
-
-
- UNLINK(3) MINTLIB LIBRARY FUNCTIONS UNLINK(3)
-
-
- N✓NA✓AM✓ME✓E
- unlink - remove directory entry
-
- S✓SY✓YN✓NO✓OP✓PS✓SI✓IS✓S
- #include <unistd.h>
-
- int unlink(char *path);
-
- #include <stdio.h>
-
- int remove(const char *path);
-
- D✓DE✓ES✓SC✓CR✓RI✓IP✓PT✓TI✓IO✓ON✓N
- unlink removes the directory entry named by the pathname
- pointed to by path. On file systems that allow hard
- links, the link count of the file referred to by that
- entry is decremented by one. If this entry was the last
- link to the file, the file is removed.
-
- If any process has the file open, and the file system sup-
- ports removal of open files, the actual resource reclama-
- tion is delayed until the file is closed, even though the
- directory entry has disappeared.
-
- R✓RE✓ET✓TU✓UR✓RN✓N V✓VA✓AL✓LU✓UE✓ES✓S
- unlink returns:
-
- 0 on success. -1 on failure and sets errno to indicate
- the error.
-
- S✓SE✓EE✓E A✓AL✓LS✓SO✓O
- c✓cl✓lo✓os✓se✓e(✓(3✓3)✓),✓, l✓li✓in✓nk✓k(✓(3✓3)✓),✓, r✓rm✓md✓di✓ir✓r(✓(3✓3)✓)
-
- N✓NO✓OT✓TE✓ES✓S
- Applications should use rmdir to remove directories.
-
- MS-DOS (TOS) filesystems do not support hardlinks.
-
- MS-DOS (TOS) filesystems only allow the removal of open
- files, to be deleted on closing, since MiNT 0.98. The file
- will still have a directory entry, though.
-
- The identical function remove is available for backwards
- compatibility. Its use is discouraged.
-
-
-
-
-
-
-
-
-
-
-
-
-
- MiNT docs 0.1 3 March 1993 1
-
-
-